home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / fontutil.6 / fontutil / fontutils-0.6 / include / report.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-05  |  1.6 KB  |  57 lines

  1. /* report.h: status reporting routines.
  2.  
  3. Copyright (C) 1992 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef REPORT_H
  20. #define REPORT_H
  21.  
  22. #include <stdio.h>
  23. #include "types.h"
  24.  
  25.  
  26. /* The file we write information to.  */
  27. extern FILE *report_file;
  28.  
  29. /* Only print anything if this is true.  */
  30. extern boolean verbose;
  31.  
  32.  
  33. #define REPORT(s)                            \
  34.   do if (verbose) { fputs (s, report_file); fflush (report_file); }    \
  35.   while (0)
  36.  
  37. #define REPORT1(s, e)                            \
  38.   do if (verbose) { fprintf (report_file, s, e); fflush (report_file); }\
  39.   while (0)
  40.  
  41. #define REPORT2(s, e1, e2)                        \
  42.   do if (verbose) { fprintf (report_file, s, e1, e2);            \
  43.                     fflush (report_file); }                \
  44.   while (0)
  45.  
  46. #define REPORT3(s, e1, e2, e3)                        \
  47.   do if (verbose) { fprintf (report_file, s, e1, e2, e3);        \
  48.                     fflush (report_file); }                \
  49.   while (0)
  50.  
  51. #define REPORT4(s, e1, e2, e3, e4)                    \
  52.   do if (verbose) { fprintf (report_file, s, e1, e2, e3, e4);        \
  53.             fflush (report_file); }                 \
  54.   while (0)
  55.  
  56. #endif /* not REPORT_H */
  57.